/**
 * ModuleService.java
 */
package org.yate.oa.service.imp;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.yate.oa.dao.IBaseMapperDao;
import org.yate.oa.dao.mapper.PrivilegeMapper;
import org.yate.oa.model.PrivilegeEntity;
import org.yate.oa.service.IPrivilegeService;

/**
 * @author Yate
 * @date Nov 13, 2013
 * @description TODO
 * @version 1.0
 */
@Service
public class PrivilegeService extends BaseService<PrivilegeEntity, Long>
		implements IPrivilegeService {

	@Resource(name = "privilegeMapper")
	private PrivilegeMapper privDao;

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.yate.oa.service.imp.BaseService#getMapperDao()
	 */
	@Override
	protected IBaseMapperDao<PrivilegeEntity, Long> getMapperDao() {
		return this.privDao;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.yate.oa.service.IPrivilegeService#getEntitiesByUID(int)
	 */
	@Override
	public List<PrivilegeEntity> getEntitiesByUID(int uid) {
		return this.privDao.getEntitiesByUID(uid);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.yate.oa.service.IPrivilegeService#getEntitiesByUIDAndURL(int,
	 * java.lang.String)
	 */
	@Override
	public PrivilegeEntity getEntitiesByUIDAndURL(int uid, String url) {
		return this.privDao.getEntitiesByUIDAndURL(uid, url);
	}

	@Override
	public PrivilegeEntity getEntityBy(PrivilegeEntity e) {
		return this.privDao.getEntityBy(e);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.yate.oa.service.IPrivilegeService#getTreeByUID(int)
	 */
	@Override
	public List<PrivilegeEntity> getTreeByUID(int uid) {
		return this.privDao.getTreeByUID(uid);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.yate.oa.service.IPrivilegeService#getEntityByUIDAndPID(int,
	 * long)
	 */
	@Override
	public PrivilegeEntity getEntityByUIDAndPID(int uid, long pid) {
		return this.privDao.getEntityByUIDAndPID(uid, pid);
	}

}
